package com.deyuanyun.pic.settings.controller.dto;

import com.deyuanyun.pic.settings.domain.Pagination;

/**
 * User: huanglw
 * Date: 13-11-21
 * Time: 下午4:35
 */
public class PageCommand {

    protected int current;
    protected int pageCount = 10;
    protected long totalCount;
    protected long pageSize;

    public int getCurrent() {
        return current;
    }

    public void setCurrent(int current) {
        this.current = current;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public Pagination toPagination() {
        Pagination pagination = new Pagination();
        pagination.setCurrent(this.current);
        pagination.setPageCount(this.pageCount);
        pagination.setPageSize(this.pageSize);
        pagination.setTotalCount(this.totalCount);
        return pagination;
    }
}
